package com.fantasy.entity;

import java.math.BigInteger;
import java.util.Date;
import java.util.Objects;

public class Order {
    //订单id
    private Integer id;
    //用户id
    private Integer userId;
    //订单金额
    private Integer money;
    //订单日期
    private String orderDate;
    //订单状态  1。已支付   0，未支付
    private Integer state;

    public Order() {
    }

    public Order(Integer id, Integer userId, Integer money, String orderDate, Integer state) {
        this.id = id;
        this.userId = userId;
        this.money = money;
        this.orderDate = orderDate;
        this.state = state;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public String getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", money=" + money +
                ", orderDate=" + orderDate +
                ", state=" + state +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Order order = (Order) o;
        return Objects.equals(id, order.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
